﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Model.Interfaces;

namespace View.Teachers
{
    /// <summary>
    /// Interaction logic for MainTeachersPanel.xaml
    /// </summary>
    public partial class MainTeachersPanel : UserControl
    {
        public MainTeachersPanel()
        {
            InitializeComponent();
            var teacherPanel = new TeacherPanel(); teacherPanel.Focus();
          //  teacherPanel.InputAddressEvent += InputAddressEventHandler;
            TeachersDataGrid.ItemsSource = Data.DataDispatcher.GetInstance().Teachers;
            teacherPanelGrid.Children.Add(teacherPanel);
        }

        private void FiterTextBoxTextChanged(object sender, TextChangedEventArgs e)
        {
           /* if (FilteringAttributeComboBox.SelectedValue == null) return;
            switch (FilteringAttributeComboBox.SelectedIndex)
            {
                case 0: TeachersDataGrid.Items.Filter += FullNameFilterPredicate;
                    break;

                default: MessageBox.Show(FilteringAttributeComboBox.SelectedValue.ToString());
                    break;
            }*/
        }
       /* private bool FullNameFilterPredicate(object obj)
        {
            return (((IStudent)obj).FullName.ToLowerInvariant()).Contains(FiterTextBox.Text.ToLowerInvariant());
        }*/

    }
}
